
money = int(10000)
year = int(1)
interest = 0.05
while money<20000:
    lilu = money*interest*year
    money = money+lilu
    year=year+1
print("你需要%d年才能变成两万："% year)

year = int(0)
interest = 0.05
money = int(input("你的存入金额："))
target =int(input("你的目标金额："))
while money <= target:
    lilu = money*interest*year
    money = money + lilu
    print( money,lilu)
    year = year + 1
year = year-1
print("你需要%d年才能变成期望金额："% year)
